package com.easyfile.easyfilemaster.entity.base;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 统一封装结果类
 * @author Chenpeman
 *
 * @param <T> 返回类型实体数据
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result<T> {
    private int code;
    private String msg;
    private T data;

    public LoginResult<T> toLoginResult(String token){
        return new LoginResult<>(code,msg,data,token);
    }
}
